VPATH = src
CC = g++
CXXFLAG = --std=c++11 -I headers -Ofast
HEADERS = $(wildcard headers/*.h)
LIBS = -lsfml-graphics -lsfml-window -lsfml-system
OBJ = main.o \
      diamondsquare.o \
      sfmlFrontend.o \
      mapDisplay.o \
      markovNames.o \
      landMap.o \
      lightingGenerator.o
EXEC = pws

all : pws

src/landMap.o: src/landMap.cpp
	$(CC) -c src/landMap.cpp -o landMap.o --std=c++11 -I headers -O2

%.o : %.cpp
	$(CC) -c $< -o $@ $(CXXFLAG)

pws : $(OBJ) $(HEADERS)
	$(CC) -o $(EXEC) $(OBJ) $(LIBS)

.PHONY : clean
clean :
	rm $(EXEC) $(OBJ)
